#pragma once

#include <ios>
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
#include "SystemView.h"
#include <windows.h>
#include <winbase.h>
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>

using namespace std;

class Parser
{
protected:
	int check_cost;
	int max_time_slices;

public:
	ifstream dataFile;
	string userFileName;
	string confFileName;
	string dataFileName;
	vector<string>* dataFileNames;
	int dataFileIndex;
	int ourTime;
	SystemView* view;
	int SSD_num;
	int FC_num;
	int SATA_num;
	vector<double>* response_times;
	int whichAlgo;
	vector<char *> tokens;
	char line[200];

	Parser(void);
	Parser(string configFile, string userFile);
	~Parser(void);

	SystemView* createSystem();		
	vector<ExtentEntry*>* ParseNextTimeSlice();
	void ParseStorageCharacteristics(string filename);
	void ParseUserInput(string FileName);
	void startOver();
	void setSystemRecommendation(int check, int max_ts);
};

